package com.huilian.cloud.module.test.order.service;

import com.alibaba.fastjson.JSON;
import com.huilian.cloud.module.test.order.entity.Order;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.kafka.core.KafkaTemplate;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class OrderService {

    @Autowired
    private KafkaTemplate kafkaTemplate;
    public Boolean sendOrder(Order order){
        kafkaTemplate.send(Order.TOPIC, order) ;
        return true ;
    }

}
